<script>
    var arr = ['鹿晗', '王俊凯', '蔡徐坤', '彭于晏', '周杰伦', '刘德华', '赵本山']
    l = arr.length
    while (l-- > 0) {
        do {
            r = Math.floor(Math.random() * 10)
        } while (r >= arr.length)//随机取一个arr内的下标

        cup = arr[l]
        arr[l] = arr[r]
        arr[r] = cup//交换
    }
    alert(arr)
</script>